package com.ruoyi.web.controller.datapermission;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.Orders;
import com.ruoyi.system.domain.vo.OrdersVo;
import com.ruoyi.system.service.IOrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 【请填写功能名称】Controller
 *
 * @author ruoyi
 * @date 2021-09-08
 */
@RestController
@RequestMapping("/data_permission/orders")
public class OrdersController extends BaseController {
    @Autowired
    private IOrdersService orderService;

    /**
     * 查询【请填写功能名称】列表
     */
    @PreAuthorize("@ss.hasPermi('data_permission:orders:list')")
    @GetMapping("/list")
    public TableDataInfo list(Orders orders) {
        startPage();
        List<OrdersVo> list = orderService.selectOrderList(orders);
        return getDataTable(list);
    }
}
